/****************************************************
 * 创建人：  tanglei  
 * 创建时间: 2022/3/2/10:39
 * 项目名称：junit_test
 * 文件名称: Pig.java
 * 文件描述: @Description: 
 *
 * All rights Reserved, Designed By 投资交易团队
 * @Copyright:2016-2022
 *
 ********************************************************/
package com.springboot.common;

import org.junit.Test;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 包名称：  src
 * 类名称：Pig
 * 类描述：
 * 创建人：  tanglei
 * 创建时间：2022/3/2 10:39
 */
public class Pig {

    @Test
    public void LongToStr() {

        List<Long> ids = new ArrayList<>();
        ids.add(Long.valueOf("13246533454111"));
        ids.add(Long.valueOf("13246222154541"));
        ids.add(Long.valueOf("13214362514541"));
        ids.add(Long.valueOf("13"));
        List<String> strIds = ids.stream().filter(x -> x.compareTo(130000000L) > 0).map(x -> x.toString()).collect(Collectors.toList());
        System.out.println("strIds = " + strIds);

        String format = String.format("[%s]清算速度为交易员定义，不能修改！", 454545);
        System.out.println("format = " + format);
    }

    @Test
    public void listTest() {
        List<String> ids = new ArrayList<>();

        ids.add("11111ee1111rwer11");
        ids.add("1111ee1111111");
        ids.add("11111ww111111");
        ids.add("1111ee1111111");
        ids.add("11111wwer111111");

        String[] ss = {"aaaaa", "sfsdfasf", "sfasf"};
        List<String> strings = Arrays.asList(ss);
        ids.addAll(strings);
        System.out.println("ids = " + ids);
    }

    @Test
    public void TestIf() {
        int x = 110;
        if( x == 10 ){
            System.out.print("Value of X is 10");
        } else if( x == 20 ){
            System.out.print("Value of X is 20");
        } else if( x == 30 ){
            System.out.print("Value of X is 30");
        } else {
            System.out.print("一个都没匹配");
        }
    }

    @Test
    public void testAssert() {

//        assertEquals();


    }

}

